
from app.celeryapp import app

def BaseCeleryApp():
    def wraps(func):
        @app.task(base=QueueOnce, name=func.__name__)
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            res = func(*args, **kwargs)
            return res
        return wrapper

    return wraps

